﻿using FlashPay.EF.Models;
using FlashPay.Entity;
using FlashPay.Entity.Parameter;
using FlashPay.Entity.Request;
using FlashPay.Entity.Request.Bank;
using FlashPay.Entity.Response.BankCard;
using System;
using System.Collections.Generic;
using System.Text;

namespace FlashPay.Service.Interface
{
    public interface BankCardService
    {
        /// <summary>
        /// 根据编号获取银行卡信息
        /// </summary>
        BankCardResponse GetById(int id);

        /// <summary>
        /// 根据银行卡号获取银行卡是否存在
        /// </summary>
        /// <param name="cardnumber">银行卡号</param>
        /// <returns>CardMerchant</returns>
        bool GetBankCardByCardnumber(string Cardnumber);

        /// <summary>
        /// 获取所有銀行卡记录
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        List<BankCard> GetList(BankCardQuery query);

        /// <summary>
        /// 获取库存卡报表
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns>List<CardMerchant></returns>
        List<BankCardExpResponse> GetPareListExp(BankCardQuery query);

        /// <summary>
        /// 分頁查詢所有銀行卡
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedList<BankCardResponse> GetPager(BankCardQuery query, bool isSpare = false);

        /// <summary>
        /// 库存卡查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedList<SpareBankCardResponse> GetSparePager(BankCardQuery query);

        /// <summary>
        /// 根据编号获取银行卡信息
        /// </summary>
        /// <param name="bcid">银行卡编号</param>
        /// <returns>CardMerchant</returns>
        JResult<BankCardResponse> GetBankCardByBcid(int bcid,int companyId, int createUid);

        /// <summary>
        /// 根据卡号或者用户名获取银行卡信息
        /// </summary>
        /// <param name="NumberOrName">银行卡号或者银行卡用户名</param>
        /// <param name="Strwhere">栏位</param>
        /// <returns></returns>
        JResult<List<BankCard>> GetBankCardByNumberOrName(string NumberOrName, string Strwhere);

        /// <summary>
        /// 新增銀行卡信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns
        JResult AddBankCard(BankCard model, Request request, bool isSpare = false);
        /// <summary>
        /// 修改銀行卡信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        JResult UpdateBankCard(BankCard model, BankCardExtraLimit modelEx, Request request);
        /// <summary>
        /// 刪除銀行卡
        /// </summary>
        /// <param name="bcid"></param>
        /// <returns></returns>
        JResult DeleteBankCard(int Bcid, Request request, bool isSpare = false);
        /// <summary>
        /// 更改银行卡启用状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        JResult ChangeBankCardSta(BankCard model,Request request);

        /// <summary>
        /// 添加、修改银行卡
        /// </summary>
        /// <param name="request"></param>
        JResult BankCardAddOrEdit(StockCardAddOrEditRequest request);

        /// <summary>
        /// 编辑虚拟机编码和备注
        /// </summary>
        /// <param name="request"></param>
        JResult BankCardEditOther(BankCard request);
    }
}
